<template>
    <div class="app-container">
        <!-- 补贴单信息 -->
        <h5 class="titleInfo">
            补贴单信息
        </h5>
        <el-form ref="list1" :inline="true" :model="list1" label-width="150px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="补贴单号">
                        <span class="spanToInput">{{list1.nickName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="预约医院">
                        <span class="spanToInput">{{list1.username | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="预约项目">
                        <span class="spanToInput">{{list1.username | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="单数">
                        <span class="spanToInput">{{list1.username | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="创建时间">
                        <span class="spanToInput">{{list1.realname | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="流水时间">
                        <span class="spanToInput">{{list1.sex | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 人员信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            人员信息
        </h5>
        <el-form ref="list1" :inline="true" :model="list1" label-width="150px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="客户姓名">
                        <span class="spanToInput">{{list1.refereeName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="客户手机号">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="用户角色">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="加盟时间">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="考核">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="推荐人姓名">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="推荐人手机号">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="管家姓名">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="管家手机号">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 补贴信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            补贴信息
            <el-button style="margin-left:30px" @click="dialogResults=true" size="mini" type="primary">每月业绩</el-button>
        </h5>
        <!-- 每月业绩弹窗 -->
        <el-dialog title="每月业绩" :visible.sync="dialogResults" width="468px">
            <template>
                <el-table
                    :data="tableData"
                    border
                    style="width:432px"
                    >
                    <el-table-column
                    prop="date"
                    label="日期"
                    width="216">
                    </el-table-column>
                    <el-table-column
                    prop="name"
                    label="姓名">
                    </el-table-column>
                </el-table>
            </template>
        </el-dialog>

        <el-form ref="list1" :inline="true" :model="list1" label-width="150px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="扣除杂费">
                        <span class="spanToInput">{{list1.refereeName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="现金补贴">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="积分补贴">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="补贴金额">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="杂费金额">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="共补贴期数">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="现金补贴">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="期数/次">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="积分补贴">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="期数/次">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="首次补贴">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 图片信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            图片信息
        </h5>
        <el-form ref="list1" :inline="true" :model="list1" label-width="150px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="消费图片">
                        <span class="spanToInput">{{list1.refereeName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="前后图片">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 协议信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            协议信息
        </h5>
        <el-form ref="list1" :inline="true" :model="list1" label-width="150px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="乙方">
                        <span class="spanToInput">{{list1.refereeName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="联系方式">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="身份证">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="地址">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="消费总金额(小写)">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="消费总金额(大写)">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="消费总积分(小写)">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="消费总积分(大写)">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="杂费合计金额(小写)">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="杂费合计金额(大写)">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="提现积分(小写)">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="提现积分(大写)">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="消费积分(小写)">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="消费积分(大写)">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="第一次奖励时间">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="乙方消费时间">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="乙方消费医院">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="乙方手术时间">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="甲方签名时间">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="乙方签名时间">
                        <span class="spanToInput">{{list1.referee | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item>
                        <el-button style="margin-top:30px;margin-left:130px" type="primary" @click="dialogAudit=true" >审核</el-button>
                    </el-form-item>
                </el-col>
                <!-- 审核弹窗 -->
                <el-dialog
                    title="审批"
                    :visible.sync="dialogAudit"
                    width="468px">
                    <!-- 输入框 -->
                    <el-form :inline="true"
                    label-width="80px"
                    label-position="right"
                    >
                        <el-input
                            type="textarea"
                            :rows="6"
                            placeholder="请输入审批意见">
                        </el-input>
                    </el-form>
                    <span slot="footer" class="dialog-footer">
                        <el-button @click="auditClose()">取 消</el-button>
                        <el-button type="primary" @click="auditSubmit()">确 定</el-button>
                    </span>
                </el-dialog>
            </el-row>
        </el-form>
    </div>
</template>
<script>
    import { vipInfo } from '@/api/vipInfo' 
    export default {
        name:"subsidyManageTrial",
        data(){
            return {
                val:"1",
                userId:"",
                list1:{},
                list2:[],
                list3:{},
                dialogResults:false,
                dialogAudit:false,
                tableData: [{
                        date: '2016-05-02',
                        name: '王小虎'
                    }, {
                        date: '2016-05-04',
                        name: '王小虎'
                    }, {
                        date: '2016-05-01',
                        name: '王小虎'
                    }, {
                        date: '2016-05-03',
                        name: '王小虎'
                }]
            }
        },
        filters:{
            filterNull(e) {
                if(!e){
                    return "暂无"
                }else{
                    return e
                }
            },
            cardNull(e){
                return window.helper.cardType(e)
            },
            userFocus(e){
                return window.helper.userFocus(e)
            }
        },
        mounted(){
            this.userId = Number(this.$route.query.userId)
            this.getList()
        },
        methods:{
            //审批取消
            auditClose(){
                this.dialogAudit = false
                console.log("审核取消")
            },
            //审批确定
            auditSubmit(){
                this.dialogAudit = false
                console.log("审批确定")
            },
            getList(){
                let datas = {userId:this.userId}
                // vipInfo(datas).then().then(res =>{
                //     console.log(res)
                //     if(!res.data.code){
                //         if(res.data.data.user){
                //             this.list1 = res.data.data.user
                //         }
                //         if(res.data.data.bankCard){
                //             this.list2 = res.data.data.bankCard
                //         }
                //         if(res.data.data.userExtra){
                //             this.list3 = res.data.data.userExtra
                //         }
                //     }else{
                //         this.$message.error("数据接口访问失败");
                //     }
                // })
                // .catch(error =>{
                //     this.$message.error(error);
                // })
            }
        }
    }
</script>

<style scoped>
    .app-container{padding: 0px!important}
    .form{margin-left: 268px}
</style>